﻿@model IEnumerable<EasyStep.Data.Entities.TestProject>

@{
	ViewBag.Title = "Constants Editor";
}
<h2>Constant Editor</h2>

<p class="buttons-li">
	@Html.ActionLink("Create New", "Create", "TestConstList", new { @class="ui-button ui-corner-all"})


<ul class="round accordion">	 
	 
@foreach (var item in Model)
{
	<li class="project-li">
		<h3>
			<a href="@Url.Action("Details", "Project", new { id = item.Id })">
				@Html.DisplayFor(modelItem => item.Name)
			</a>
		</h3>
	   <ul class="project-consts">
		@if (item.ConstantLists.Count() == 0) 
	   { 
			<li class="item const-li empty">
				<h3>no one constant list exists in this project</h3>
                <div ><!-- --></div>
			</li>
	   }
	   @foreach (var citem in item.ConstantLists)
	   { 
		   
		   <li class="item const-li">
				<a href="@Url.Action("Details", "TestConstList", new { id = citem.Id })">
					@Html.DisplayFor(modelItem => citem.Name)
				</a>
		   </li>
	   }
	   </ul>
	</li>
}    
</ul>
</p>

<script type="text/javascript">
    jQuery(document).ready(function () {
        InitAccordion($('.accordion'),0, function () {});		
	});
</script>

<script src="@Url.Content("~/Scripts/jQuery.tmpl.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/site.main.js")" type="text/javascript"></script>